<%@ page import="java.util.ArrayList" %>
<%@ page import="com.bean.Articletype" %>
<%@ page import="java.util.List" %>
<%@ page import="com.Dao.ArticleTypeDao" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>说说博客-所有文章</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/front/css/main.css">
    <style>
        .right a{
            text-decoration: none;
        }
    </style>
</head>
<%--<body background="${pageContext.request.contextPath}/front/images/sea.jpg">--%>
<body>
<%--头部--%>
<%@include file="../view/FrontTop.jsp"%>
<div class="main"
<%--左边--%>
<%@include file="../view/FrontLeft.jsp"%>
<div class="right">
    <table class="rightcontent">
        <td width="548" align="center" valign="top">
            <table width="100%" height="55" border="0" cellsapcing="0" cellpadding="0" background="images/main_B.jpg">
                <tr align="center" style="padding-bottom:10px">
                    <%
                        ArticleTypeDao articleTypeDao=new ArticleTypeDao();
                        List<Articletype> allType=articleTypeDao.getAllType();
                        if(allType==null||allType.size()==0){
                    %>
                    <td align="center"><li>没有文章类别可显示！</li></td>
                    <%
                    }
                    else {
                        for (int i = 0; i < allType.size(); i++) {
                            Articletype single = (Articletype) allType.get(i);
                    %>
                    <td><a href="/Article?action=select&typeName=<%=single.getTypeName() %>"><%=single.getTypeName() %></a></td>
                    <%
                            }
                        }
                    %>
                </tr>
            </table>
            <p>请选择一种文章类别！
        </td>
    </table>
</div>
</div>
<%--底部--%>
<%@include file="../view/FrontEnd.jsp"%>
</body>
</html>